package com.pharmacy.UserManage.service;//package com.pharmacy.UserManage.service;
//
//
//import com.pharmacy.UserManage.dao.OperationLogMapper;
//import com.pharmacy.UserManage.entity.OperationLog;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.Date;
//import java.util.List;
//
//@Service
//public class OperationLogServiceImpl implements OperationLogService {
//
//    @Autowired
//    private OperationLogMapper operationLogMapper;
//
//    @Override
//    public List<OperationLog> getAllLogs() {
//        return operationLogMapper.findAllLogs();
//    }
//
//    @Override
//    public List<OperationLog> getLogsByCondition(String operationType, String targetType, Date startDate, Date endDate) {
//        return operationLogMapper.findLogsByCondition(operationType, targetType, startDate, endDate);
//    }
//
//    @Override
//    public void addLog(OperationLog log) {
//        try {
//            operationLogMapper.addLog(log);
//        } catch (Exception e) {
//            // 日志记录失败不应影响主业务
//            System.err.println("记录操作日志失败: " + e.getMessage());
//        }
//    }
//}
